evaluating expressions with two variables